import request from '../request'
import type { Login, Code } from '@/TS/utlis/interface/Login'
// 密码登录
export const loginByPassword = (data: Login.loginByPassword, Proxy: any) => {
  return request(
    {
      url: '/rider/systemRiderUsers/loginByPassword',
      method: 'POST',
      show: true,
      data,
    },
    Proxy
  )
}
// 验证码登录
export const loginByCode = (data: Login.loginByPassword, Proxy: any) => {
  return request(
    {
      url: '/rider/systemRiderUsers/loginByCode',
      method: 'POST',
      show: true,
      data,
    },
    Proxy
  )
}

// 重置密码
export const resetPassword = (data: Login.resetPassword, Proxy: any) => {
  return request(
    {
      url: '/rider/systemRiderUsers/resetPassword',
      method: 'POST',
      show: true,
      data,
    },
    Proxy
  )
}
// 获取验证码
export const getPhoneCode = (data: Code.phoneCode, Proxy: any) => {
  return request(
    {
      url: '/member/auth/send-sms-code',
      method: 'POST',
      show: true,
      data,
    },
    Proxy
  )
}
